package com.fujin.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fujin.common.utils.PageUtils;
import com.fujin.gulimall.product.Vo.AttrGroupRelationVo;
import com.fujin.gulimall.product.Vo.AttrResponseVo;
import com.fujin.gulimall.product.Vo.AttrVo;
import com.fujin.gulimall.product.entity.AttrEntity;
import com.fujin.gulimall.product.entity.ProductAttrValueEntity;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author fujin
 * @email 1242257@gmail.com
 * @date 2021-12-25 10:56:06
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attrVo);

    PageUtils queryBasePage(Map<String, Object> params, Long catelogId, String type);

    AttrResponseVo getAttrInfo(Long attrId);

    void updateAttr(AttrResponseVo attr);

    List<AttrEntity> getRelation(Long attrGroupId);

    void relationDelete(AttrGroupRelationVo[] attrGroupRelationVo);

    PageUtils attrNoRelation(Long attrGroupId, Map<String, Object> params);

    List<ProductAttrValueEntity> listCatelogById(Long spuId);

    /**
     * 得到可以检索的规格属性
     * @param attrIds
     * @return
     */
    List<Long> selectSearchAttrIds(List<Long> attrIds);
}

